//
//  XMServiceInfoView.m
//  XMJJ_zmy
//
//  Created by 丁浩 on 2025/7/9.
//

#import "XMServiceInfoView.h"

@interface XMServiceInfoView ()

@property (nonatomic, strong) UITextView *contentTextView;

@end

@implementation XMServiceInfoView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatUI];
    }
    return self;
}

- (void)creatUI {
    [self addSubview:self.navView];
    [self addSubview:self.contentTextView];
}

- (void)setContentWithTitle:(NSString *)title {
    self.navTitleLabel.text = title;
}

- (void)setContentWithContent:(NSString *)contentStr {
    _contentTextView.text = contentStr;
}

- (UITextView *)contentTextView {
    if (!_contentTextView) {
        _contentTextView = [[UITextView alloc] initWithFrame:CGRectMake(0, kNavagationBarH, self.width, self.height - kNavagationBarH)];
        _contentTextView.editable = NO;
        _contentTextView.font = KFontSize(16.0);
    }
    return _contentTextView;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
